Undoubtedly, we’ve all heard about “flattening the curve”, where the goal is to slow the rate of new COVID-19 infections by limiting person-to-person contacts. A related question is what the curve even looks like right now. Is it accelerating or slowing down? When is the peak expected to occur? Since data collection became more systematic, we are in a position to begin answering some of these questions by looking for trends in the values observed so far.
Below, I apply some very basic curve fitting to model new COVID-19 cases in the U.S. over time. The data is taken from The COVID Tracking Project. I chose to fit a log-normal distribution, which is traditionally used by epidemilogists to model cases by date of onset. The curve has an asymmetric bell-like shape with a rapid increase in new cases at the start, followed by a more gradual decrease over time.
After fitting the curve, I use it to plot projections for five days in the future. It probably goes without saying, but this is a pet project I started while being in lockdown. The predictions presented here are mostly to satisfy my own curiosity and should be taken with a grain of salt, since they don’t account for the many factors at play in a rapidly-changing situation. With that said, I will aim to re-run the script daily to fit new data points as they become available.
The plot is interactive and best viewed on a computer, where you can hover a mouse pointer over individual points, as well as click and drag to pan and zoom around. The functionality is more limited on a mobile screen and seems to vary from device to device, but the interactivity is still largely there. Consequently, the plotting area prevents you from scrolling with your finger; swipe along the edges of the plot to scroll instead.